import { createRouter, createWebHistory } from 'vue-router'
import HomeHh from '../views/HomeHh.vue'
import HistoryHh from '../views/HistoryHh.vue'
import SettingsSs from '../views/SettingsSs.vue'
import LogIn from '../components/LogIn.vue'
import AboutUs from '../views/AboutUs.vue' // 引入新组件

const routes = [
  {
    path: '/',
    name: 'LogIn',
    component: LogIn
  },
  {
    path: '/home',
    name: 'HomeH',
    component: HomeHh,
    meta: { requiresAuth: true }
  },
  {
    path: '/history',
    name: 'HistoryH',
    component: HistoryHh,
    meta: { requiresAuth: true }
  },
  {
    path: '/settings',
    name: 'SettingsS',
    component: SettingsSs,
    meta: { requiresAuth: true }
  },
  {
    path: '/about',
    name: 'AboutUs',
    component: AboutUs,
    meta: { requiresAuth: true }
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router